home *** CD-ROM | disk | FTP | other *** search
- on keyDown
- global partnum, TxtCursor, changer, takeinput, castnumber, firstcursor
- if takeinput = 0 then
- exit
- end if
- set tensdigit to 21 + ((partnum - 1) * 2)
- set onesdigit to 22 + ((partnum - 1) * 2)
- if (the key = "w") and the optionDown then
- stopMovie()
- end if
- if the number of chars in changer < 2 then
- if (the key >= "0") and (the key <= "9") then
- set changer to changer & the key
- end if
- end if
- if (the key = RETURN) or (the key = ENTER) then
- if char 2 of changer = EMPTY then
- set the castNum of sprite onesdigit to getAt(castnumber, 12)
- set TxtCursor to 0
- end if
- if takeinput = 2 then
- set takeinput to 3
- exit
- end if
- if value(changer) = 0 then
- exit
- end if
- checkit()
- else
- if the key = BACKSPACE then
- set monkey to changer
- if the number of chars in monkey > 1 then
- set monkey to char 1 to the number of chars in monkey - 1 of monkey
- set changer to monkey
- else
- set changer to EMPTY
- end if
- end if
- set holdchar1 to char 1 of changer
- set holdchar2 to char 2 of changer
- if holdchar1 = EMPTY then
- set the castNum of sprite onesdigit to getAt(castnumber, 12)
- set the castNum of sprite tensdigit to getAt(castnumber, 12)
- set TxtCursor to tensdigit
- else
- set the castNum of sprite tensdigit to getAt(castnumber, 1 + value(holdchar1))
- if holdchar2 = EMPTY then
- set TxtCursor to onesdigit
- set the castNum of sprite onesdigit to getAt(castnumber, 12)
- else
- set the castNum of sprite onesdigit to getAt(castnumber, 1 + value(holdchar2))
- set TxtCursor to 0
- end if
- end if
- end if
- if TxtCursor > 0 then
- set the castNum of sprite TxtCursor to firstcursor
- end if
- updateStage()
- end
-
- on RotateCursor
- global TxtCursor, lastcursor, firstcursor
- if the castNum of sprite TxtCursor > 0 then
- set mycast to the castNum of sprite TxtCursor
- if mycast = lastcursor then
- set the castNum of sprite TxtCursor to firstcursor
- else
- set the castNum of sprite TxtCursor to 1 + the castNum of sprite TxtCursor
- end if
- updateStage()
- end if
- end
-
- on moveyes
- global bugeyesx, bugeyesy, eyerange
- set eyegore to eyerange / 2
- set mh to the mouseH
- set mv to the mouseV
- if mh > 640 then
- set mh to 640
- end if
- if mh < 0 then
- set mh to 0
- end if
- if mv > 480 then
- set mv to 480
- end if
- if mv < 0 then
- set mv to 0
- end if
- set mh to bugeyesx - ((bugeyesx - mh) / eyerange)
- set mv to bugeyesy - ((bugeyesy - mv) / eyerange)
- set the locH of sprite 19 to mh
- set the locV of sprite 19 to mv
- end
-
- on sodit
- end
-